#include "array.h"

void array_clear(unsigned char *list, unsigned char length) {
	unsigned char i;
	for (i = 0; i < length; i++) {
		list[i] = 0;
	}
}

void array_copy(unsigned char *list, unsigned char length, unsigned char *value) {
	unsigned char i;
	for (i = 0; i < length; i++) {
		list[i] = value[i % length];
	}
}

void array_insert_list(unsigned char *list, unsigned char length, unsigned char *value) {
	unsigned char i;
	for (i = 0; i < length; i++) {
		list[i] = value[i % length];
	}
}

void array_insert_data(unsigned char *list, unsigned char length, unsigned char value) {
	unsigned char i;
	for (i = 0; i < length; i++) {
		list[i] = value[i % length];
	}
}